<blocks app="Snap! 6, https://snap.berkeley.edu" version="1"><block-definition s="$brush set pen to crayon %&apos;which&apos;" type="command" category="pen"><comment x="0" y="0" w="297.3333333333333" collapsed="false">Reports one of 100 preselected colors, like a box of 100 crayons.&#xD;The colors have names that are meant to be evocative.&#xD;They are organized in families, more or less corresponding&#xD;to spectral (rainbow) colors; the input slot has a two-level menu&#xD;in which you can hover over a family name to see the colors&#xD;of that family, each including a crayon number and an RGB value. &#xD;See Appendix A of the Snap! Reference Manual for more details.</comment><header></header><code></code><translations></translations><inputs><input type="%n"><options>grays={&#xD;0 black #000000=0&#xD;1 gray7 #121212=1&#xD;2 gray14 #242424=2&#xD;3 gray21 #363636=3&#xD;4 gray28 #484848=4&#xD;5 gray36 #5c5c5c=5&#xD;6 gray43 #6d6d6d=6&#xD;7 gray50 #7f7f7f=7&#xD;8 gray57 #919191=8&#xD;9 gray64 #a3a3a3=9&#xD;10 gray71 #b5b5b5=10&#xD;11 gray78 #c8c8c8=11&#xD;12 gray85 #dadada=12&#xD;13 gray92 #ececec=13&#xD;14 white #ffffff=14&#xD;}&#xD;pinks={&#xD;15 deep pink #ff1493=15&#xD;16 hot pink #ff69b4=16&#xD;17 bright pink #ff007f=17&#xD;18 raspberry #e30b5d=18&#xD;19 amaranth #e52b50=19&#xD;}&#xD;reds={&#xD;20 red #ff0000=20&#xD;21 burgundy #900020=21&#xD;22 cherry #990000=22&#xD;23 dark candy apple red #a40000=23&#xD;24 sanguine #c00000=24&#xD;25 maroon #800000=25&#xD;26 crimson #c90016=26&#xD;27 Lists #d94d11=27&#xD;28 candy apple red #ff0800=28&#xD;29 coquelicot #ff3800=29&#xD;}&#xD;browns={&#xD;30 saddle brown #8b4513=30&#xD;31 chocolate #7b3f00=31&#xD;32 kobicha #6b4423=32&#xD;33 sepia #704214=33&#xD;34 chestnut #954535=34&#xD;35 dark brown #654321=35&#xD;36 brown #964b00=36&#xD;37 golden brown #996515=37&#xD;38 cinnamon #b87333=38&#xD;39 copper #d2691e=39&#xD;}&#xD;oranges={&#xD;40 orange #ff7f00=40&#xD;41 Pantone orange #ff5800=41&#xD;42 pumpkin #ff7518=42&#xD;43 Variables #f3761d=43&#xD;44 Spanish orange #e86100=44&#xD;45 burnt orange #cc5500=45&#xD;46 sinopia #cb410b=46&#xD;47 ochre #cc7722=47&#xD;48 carrot #ed9121=48&#xD;49 tangerine #f28500=49&#xD;}&#xD;yellows={&#xD;50 yellow #ffff00=50&#xD;51 Control #e6a822=51&#xD;52 dark goldenrod #b8860b=52&#xD;53 goldenrod #daa520=53&#xD;54 saffron #f4c430=54&#xD;55 sandstorm #ecd540=55&#xD;56 mustard #ffdb58=56&#xD;57 gold #ffd700=57&#xD;58 egg yolk #fee33e=58&#xD;59 rubber duck #fbe108=59&#xD;}&#xD;greens={&#xD;60 lime #00ff00=60&#xD;61 apple green #8db600=61&#xD;62 Operators #62c213=62&#xD;63 forest green #228b22=63&#xD;64 green #008000=64&#xD;65 dark green #006400=65&#xD;66 dark pastel green #03c03c=66&#xD;67 emerald #50c878=67&#xD;68 mint #3eb489=68&#xD;69 Pen #00a178=69&#xD;}&#xD;cyans={&#xD;70 aqua (cyan) #00ffff=70&#xD;71 dark cyan #008b8b=71&#xD;72 cerulean #007ba7=72&#xD;73 iceberg #71a6d2=73&#xD;74 Sensing #0494dc=74&#xD;75 teal #008080=75&#xD;76 light sky blue #87cefa=76&#xD;77 deep sky blue #00bfff=77&#xD;78 dodger blue #1e90ff=78&#xD;79 azure #007fff=79&#xD;}&#xD;blues={&#xD;80 blue #0000ff=80&#xD;81 midnight blue #191970=81&#xD;82 dark powder blue #003399=82&#xD;83 cobalt #0047ab=83&#xD;84 denim #1560bd=84&#xD;85 navy blue #000080=85&#xD;86 steel blue #4682b4=86&#xD;87 Motion #4a6cd4=87&#xD;88 cornflower #6495ed=88&#xD;89 slate blue #6a5acd=89&#xD;}&#xD;purples={&#xD;90 violet #8000ff=90&#xD;91 Looks #8f56e3=91&#xD;92 grape #6f2da8=92&#xD;93 indigo #4b0082=93&#xD;94 x11 purple #a020f0=94&#xD;95 magenta (fuchia) #ff00ff=95&#xD;96 dark orchid #9932cc=96&#xD;97 Sound #cf4ad9=97&#xD;98 purple #7f007f=98&#xD;99 dark magenta #8b008b=99&#xD;}</options></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doSetVar"><l>✐ last crayon</l><block var="which"/></block><block s="doSetVar"><l>✐ last set as</l><l>crayon</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>✐ crayon colors</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ crayon colors</l></list></custom-block><block s="doSetVar"><l>✐ crayon colors</l><block s="reportNewList"><list><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>18</l><l>18</l><l>18</l></list></block><block s="reportNewList"><list><l>36</l><l>36</l><l>36</l></list></block><block s="reportNewList"><list><l>54</l><l>54</l><l>54</l></list></block><block s="reportNewList"><list><l>72</l><l>72</l><l>72</l></list></block><block s="reportNewList"><list><l>92</l><l>92</l><l>92</l></list></block><block s="reportNewList"><list><l>109</l><l>109</l><l>109</l></list></block><block s="reportNewList"><list><l>127</l><l>127</l><l>127</l></list></block><block s="reportNewList"><list><l>145</l><l>145</l><l>145</l></list></block><block s="reportNewList"><list><l>163</l><l>163</l><l>163</l></list></block><block s="reportNewList"><list><l>181</l><l>181</l><l>181</l></list></block><block s="reportNewList"><list><l>200</l><l>200</l><l>200</l></list></block><block s="reportNewList"><list><l>218</l><l>218</l><l>218</l></list></block><block s="reportNewList"><list><l>236</l><l>236</l><l>236</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>20</l><l>147</l></list></block><block s="reportNewList"><list><l>255</l><l>105</l><l>180</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>127</l></list></block><block s="reportNewList"><list><l>227</l><l>11</l><l>93</l></list></block><block s="reportNewList"><list><l>229</l><l>43</l><l>80</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>144</l><l>0</l><l>32</l></list></block><block s="reportNewList"><list><l>153</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>164</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>192</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>201</l><l>0</l><l>22</l></list></block><block s="reportNewList"><list><l>217</l><l>77</l><l>17</l></list></block><block s="reportNewList"><list><l>255</l><l>8</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>56</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>123</l><l>63</l><l>0</l></list></block><block s="reportNewList"><list><l>107</l><l>68</l><l>35</l></list></block><block s="reportNewList"><list><l>112</l><l>66</l><l>20</l></list></block><block s="reportNewList"><list><l>149</l><l>69</l><l>53</l></list></block><block s="reportNewList"><list><l>101</l><l>67</l><l>33</l></list></block><block s="reportNewList"><list><l>150</l><l>75</l><l>0</l></list></block><block s="reportNewList"><list><l>153</l><l>101</l><l>21</l></list></block><block s="reportNewList"><list><l>184</l><l>115</l><l>51</l></list></block><block s="reportNewList"><list><l>210</l><l>105</l><l>30</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>88</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>117</l><l>24</l></list></block><block s="reportNewList"><list><l>243</l><l>118</l><l>29</l></list></block><block s="reportNewList"><list><l>232</l><l>97</l><l>0</l></list></block><block s="reportNewList"><list><l>204</l><l>85</l><l>0</l></list></block><block s="reportNewList"><list><l>203</l><l>65</l><l>11</l></list></block><block s="reportNewList"><list><l>204</l><l>119</l><l>34</l></list></block><block s="reportNewList"><list><l>237</l><l>145</l><l>33</l></list></block><block s="reportNewList"><list><l>242</l><l>133</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>230</l><l>168</l><l>34</l></list></block><block s="reportNewList"><list><l>184</l><l>134</l><l>11</l></list></block><block s="reportNewList"><list><l>218</l><l>165</l><l>32</l></list></block><block s="reportNewList"><list><l>244</l><l>196</l><l>48</l></list></block><block s="reportNewList"><list><l>236</l><l>213</l><l>64</l></list></block><block s="reportNewList"><list><l>255</l><l>219</l><l>88</l></list></block><block s="reportNewList"><list><l>255</l><l>215</l><l>0</l></list></block><block s="reportNewList"><list><l>254</l><l>227</l><l>62</l></list></block><block s="reportNewList"><list><l>251</l><l>225</l><l>8</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>141</l><l>182</l><l>0</l></list></block><block s="reportNewList"><list><l>98</l><l>194</l><l>19</l></list></block><block s="reportNewList"><list><l>34</l><l>139</l><l>34</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>100</l><l>0</l></list></block><block s="reportNewList"><list><l>3</l><l>192</l><l>60</l></list></block><block s="reportNewList"><list><l>80</l><l>200</l><l>120</l></list></block><block s="reportNewList"><list><l>62</l><l>180</l><l>137</l></list></block><block s="reportNewList"><list><l>0</l><l>161</l><l>120</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>139</l><l>139</l></list></block><block s="reportNewList"><list><l>0</l><l>123</l><l>167</l></list></block><block s="reportNewList"><list><l>113</l><l>166</l><l>210</l></list></block><block s="reportNewList"><list><l>4</l><l>148</l><l>220</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>128</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>250</l></list></block><block s="reportNewList"><list><l>0</l><l>191</l><l>255</l></list></block><block s="reportNewList"><list><l>30</l><l>144</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>127</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>25</l><l>25</l><l>112</l></list></block><block s="reportNewList"><list><l>0</l><l>51</l><l>153</l></list></block><block s="reportNewList"><list><l>0</l><l>71</l><l>171</l></list></block><block s="reportNewList"><list><l>21</l><l>96</l><l>189</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l></list></block><block s="reportNewList"><list><l>70</l><l>130</l><l>180</l></list></block><block s="reportNewList"><list><l>74</l><l>108</l><l>212</l></list></block><block s="reportNewList"><list><l>100</l><l>149</l><l>237</l></list></block><block s="reportNewList"><list><l>106</l><l>90</l><l>205</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>143</l><l>86</l><l>227</l></list></block><block s="reportNewList"><list><l>111</l><l>45</l><l>168</l></list></block><block s="reportNewList"><list><l>75</l><l>0</l><l>130</l></list></block><block s="reportNewList"><list><l>160</l><l>32</l><l>240</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>153</l><l>50</l><l>204</l></list></block><block s="reportNewList"><list><l>207</l><l>74</l><l>217</l></list></block><block s="reportNewList"><list><l>127</l><l>0</l><l>127</l></list></block><block s="reportNewList"><list><l>139</l><l>0</l><l>139</l></list></block></list></block></block></script></block><block s="doDeclareVariables"><list><l>color</l></list></block><block s="doSetVar"><l>color</l><block s="reportListItem"><block s="reportSum"><block s="reportModulus"><block var="which"/><l>100</l></block><l>1</l></block><block var="✐ crayon colors"/></block></block><custom-block s="set pen color to r: %n g: %n b: %n"><block s="reportListItem"><l>1</l><block var="color"/></block><block s="reportListItem"><l>2</l><block var="color"/></block><block s="reportListItem"><l>3</l><block var="color"/></block></custom-block></script></block-definition><block-definition s="set pen color to r: %&apos;r&apos; g: %&apos;g&apos; b: %&apos;b&apos;" type="command" category="pen"><comment x="0" y="0" w="220.66666666666666" collapsed="false">Takes three inputs for red, green, and blue&#xD;values, each between 0 and 255.  0,0,0 is black; 255,255,255 is white.  255,255,0 is yellow, and so on.&#xD;&#xD;The SET PEN block in this library lets you set individual red, green, or blue without changing the others, lets you provide a list of three RGB color components, and lets you provide a six-digit hexadecimal number, the form in which RGB color values are usually found online.&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:altera a cor da tua caneta para vermelho _ , verde _ e azul _ (0 a 255)&#xD;</translations><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r</l><l>g</l><l>b</l></list><l>this.setColor(new Color(r, g, b));</l></block><list><block var="r"/><block var="g"/><block var="b"/></list></block></script></block-definition><block-definition s="set pen color to h: %&apos;h&apos; s: %&apos;s&apos; v: %&apos;v&apos;" type="command" category="pen"><comment x="0" y="0" w="283.3333333333333" collapsed="false">Takes three inputs for hue, saturation, and value (&quot;brightness&quot;)&#xD;values, each between 0 and 1.  0,0,0 is black; 0,0,1 is white.  0.15,1,1 is yellow, and so on.&#xD;&#xD;The SET PEN block in this library lets you set individual hue, saturation, or value without changing the others, lets you provide a list of three HSV color components, and lets you&#xD;use the very much superior HSL (hue, saturation, lightness)&#xD;color space.&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:altera a cor da caneta para matiz _ , saturação _ e brilho _ (0 a 1)&#xD;</translations><inputs><input type="%n">0.3</input><input type="%n">0.7</input><input type="%n">0.6</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>h</l><l>s</l><l>v</l></list><l>var col = new Color();&#xD;col.set_hsv(h, s, v);&#xD;this.setColor(col);</l></block><list><block var="h"/><block var="s"/><block var="v"/></list></block></script></block-definition><block-definition s="RGB color" type="reporter" category="pen"><comment x="0" y="0" w="266" collapsed="false">Reports the current pen color as a list of three RGB values in the range 0-255.  The PEN block in this library provides a large set of ways to examine the color.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:a cor da caneta em RGB (vermelho, verde e azul; 0 a 255)&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List([this.color.r, this.color.g, this.color.b]);</l></block><list></list></block></block></script></block-definition><block-definition s="HSV color" type="reporter" category="pen"><comment x="0" y="0" w="312" collapsed="false">Reports the current pen color as a list of three HSV values&#xD;in the range 0-1.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:a cor da caneta em HSV (matiz, saturação e brilho, 0 a 1)&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List(this.color.hsv());</l></block><list></list></block></block></script></block-definition><block-definition s="$brush set pen %&apos;dimension&apos; to %&apos;value&apos;" type="command" category="pen"><comment w="265.3333333333333" collapsed="false">This block allows you to set the pen&apos;s color, transparency (on a scale from 0=opaque to 100=invisible), or size (in pixels).  The color can be set in many ways, including RGB values, HSV values, HSL values, fair HSV or HSL (based on a modified spectrum that gives each spectral color equal space and promotes brown to a color), or X11/W3C color name.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;color&#xD;fair hue&#xD;transparency&#xD;X11/W3C name&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input><input type="%s"></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doDeclareVariables"><list><l>colors</l><l>brights</l><l>index</l><l>scale</l><l>oldHSV</l><l>newHSV</l><l>color</l><l>pivots</l></list></block><block s="doSetVar"><l>colors</l><block s="reportNewList"><list><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l></list></block><block s="reportNewList"><list><l>192</l><l>192</l><l>192</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>85</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>70</l><l>5</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>140</l><l>60</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>114</l><l>93</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>30</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>50</l><l>50</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>64</l></list></block><block s="reportNewList"><list><l>80</l><l>0</l><l>90</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block></list></block></block><block s="doSetVar"><l>brights</l><block s="reportNewList"><list><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>170</l><l>20</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>170</l><l>90</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>160</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>190</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>240</l><l>200</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>127</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>60</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>64</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block></list></block></block><block s="doSetVar"><l>pivots</l><block s="reportNewList"><list><l>0</l><l>5.8</l><l>12.5</l><l>18</l><l>25</l><l>30.5</l><l>37.5</l><l>44.5</l><l>50</l><l>59</l><l>62.5</l><l>69</l><l>75</l><l>79.25</l><l>87.5</l><l>93.75</l><l>97</l><l>100</l></list></block></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>color</l><l>hue</l><l>fair hue</l></list></block><block var="dimension"/></block><script><block s="doSetVar"><l>value</l><block s="reportModulus"><block var="value"/><l>100</l></block></block></script><script><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>red</l><l>green</l><l>blue</l></list></block><block var="dimension"/></block><script><block s="doIf"><block s="reportLessThan"><block var="value"/><l>0</l></block><script><block s="doSetVar"><l>value</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="value"/><l>255</l></block><script><block s="doSetVar"><l>value</l><l>255</l></block></script></block></script><script><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>saturation (HSV)</l><l>saturation (HSL)</l><l>value (brightness)</l><l>lightness</l><l>fair saturation (HSV)</l><l>fair saturation (HSL)</l><l>fair value (brightness)</l><l>fair lightness</l><l>transparency</l></list></block><block var="dimension"/></block><script><block s="doIf"><block s="reportLessThan"><block var="value"/><l>0</l></block><script><block s="doSetVar"><l>value</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="value"/><l>100</l></block><script><block s="doSetVar"><l>value</l><l>100</l></block></script></block></script><comment w="164.66666666666666" collapsed="false">We have to do this last test to rule out the vector options, which aren&apos;t numbers; their code makes three recursive calls and we catch range issues then.</comment></block></script></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>size</l></block><script><block s="setSize"><block var="value"/></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>hue</l></block><script><block s="setPenHSVA"><l><option>hue</option></l><block var="value"/></block><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doReplaceInList"><l>1</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block></script></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportNewList"><list><l>HSL</l><l>HSV</l></list></block><block var="✐ last set as"/></block></block><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block></script></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSV)</l></block><script><block s="setPenHSVA"><l><option>saturation</option></l><block var="value"/></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>value (brightness)</l></block><script><block s="setPenHSVA"><l><option>brightness</option></l><block var="value"/></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>transparency</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block var="value"/></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>red</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block><l></l><l></l></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>green</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block><l></l></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>blue</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair hue</l></block><script><block s="doSetVar"><l>oldHSV</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l>100</l><l></l></block></autolambda><list></list></block><custom-block s="HSV color"></custom-block></block></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportNewList"><list><l>HSL</l><l>HSV</l></list></block><block var="✐ last set as"/></block></block><script><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></list></block></block><block s="doSetVar"><l>oldHSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></list></block></block></script></block><block s="doSetVar"><l>value</l><block s="reportModulus"><block var="value"/><l>100</l></block></block><block s="doSetVar"><l>color</l><block s="reportProduct"><block var="value"/><l>3.6</l></block></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportListItem"><block var="index"/><block var="pivots"/></block><block var="value"/></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doChangeVar"><l>index</l><l>-1</l></block><block s="doSetVar"><l>scale</l><block s="reportQuotient"><block s="reportDifference"><block var="value"/><block s="reportListItem"><block var="index"/><block var="pivots"/></block></block><block s="reportDifference"><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="pivots"/></block><block s="reportListItem"><block var="index"/><block var="pivots"/></block></block></block></block><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="min %s %s"><block s="reportRound"><block s="reportSum"><block var="from"/><block s="reportProduct"><block s="reportDifference"><block var="to"/><block var="from"/></block><block var="scale"/></block></block></block><l>255</l></custom-block></autolambda><list><l>from</l><l>to</l></list></block><list><block s="reportListItem"><block var="index"/><block var="brights"/></block><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="brights"/></block></list></custom-block></block><block s="doSetVar"><l>newHSV</l><custom-block s="HSV color"></custom-block></block><block s="doIfElse"><block var="✐ fair?"/><script><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="newHSV"/></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="newHSV"/></block><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block><l>100</l></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>3</l><block var="newHSV"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block><l>100</l></block></custom-block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><block var="value"/><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></list></block></block></script><script><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="newHSV"/></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="newHSV"/></block><block s="reportListItem"><l>2</l><block var="oldHSV"/></block></block><l>100</l></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>3</l><block var="newHSV"/></block><block s="reportListItem"><l>3</l><block var="oldHSV"/></block></block><l>100</l></block></custom-block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><block var="value"/><block s="reportListItem"><l>2</l><block var="oldHSV"/></block><block s="reportListItem"><l>3</l><block var="oldHSV"/></block></list></block></block></script></block><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block></script><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block></script></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script><comment w="90" collapsed="true">fair hue</comment></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>color</l><comment w="53.333333333333336" collapsed="true">Color</comment></block><script><block s="doSetVar"><l>✐ color scale</l><block var="value"/></block><block s="doSetVar"><l>color</l><block s="reportProduct"><block var="value"/><l>3</l></block></block><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="color"/><l>42</l></block></block><script><block s="doSetVar"><l>color</l><block s="reportModulus"><block s="reportProduct"><block var="color"/><block s="reportQuotient"><l>15</l><l>14</l></block></block><l>300</l></block></block><block s="doSetVar"><l>index</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block var="color"/><l>15</l></block></block></block><block s="doSetVar"><l>scale</l><block s="reportDifference"><block var="color"/><block s="reportProduct"><block var="index"/><l>15</l></block></block></block></script><script><block s="doIf"><block s="reportLessThan"><block var="color"/><l>60</l><comment w="96.66666666666667" collapsed="true">spread out pink</comment></block><script><block s="doSetVar"><l>color</l><block s="reportSum"><l>45</l><block s="reportProduct"><block s="reportDifference"><block var="color"/><l>42</l></block><block s="reportQuotient"><l>15</l><l>18</l></block></block></block></block></script></block><block s="doSetVar"><l>color</l><block s="reportModulus"><block var="color"/><l>300</l></block></block><block s="doSetVar"><l>index</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block var="color"/><l>15</l></block></block></block><block s="doSetVar"><l>scale</l><block s="reportDifference"><block var="color"/><block s="reportProduct"><block var="index"/><l>15</l></block></block></block></script><comment w="77.33333333333333" collapsed="true">grayscale</comment></block><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="min %s %s"><block s="reportRound"><block s="reportSum"><block var="from"/><block s="reportProduct"><block s="reportDifference"><block var="to"/><block var="from"/></block><block s="reportQuotient"><block var="scale"/><l>15</l></block></block></block></block><l>255</l></custom-block></autolambda><list><l>from</l><l>to</l></list></block><list><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="colors"/></block><block s="reportListItem"><block s="reportSum"><block var="index"/><l>2</l></block><block var="colors"/></block></list></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>color</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSL)</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>lightness</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSV)</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="setPenHSVA"><l><option>saturation</option></l><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="getPenAttribute"><l><option>saturation</option></l></block><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block></block><block var="value"/></block></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair value (brightness)</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="setPenHSVA"><l><option>brightness</option></l><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="getPenAttribute"><l><option>brightness</option></l></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block></block><block var="value"/></block></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSL)</l></block><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSV</l></block><script><custom-block s="✐ update HSL"></custom-block></script><script><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><l>100</l></block></script></block></script></block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSL"/><block var="value"/></block><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="reportListItem"><l>2</l><block var="✐ HSL"/></block><block s="reportListItem"><l>2</l><block var="✐ raw HSL"/></block></block></block><block var="value"/></block></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ update HSV"></custom-block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair lightness</l></block><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSV</l></block><script><custom-block s="✐ update HSL"></custom-block></script><script><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><l>50</l></block></script></block></script></block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSL"/><block var="value"/></block><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="reportListItem"><l>3</l><block var="✐ HSL"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSL"/></block></block></block><block var="value"/></block></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ update HSV"></custom-block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSL vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>fair saturation (HSL)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair lightness</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSV vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>fair saturation (HSV)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair value (brightness)</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSL vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>saturation (HSL)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>lightness</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSV vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>saturation (HSV)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>value (brightness)</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><block s="doSetVar"><l>value</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>number</option></l></block><l></l><block s="reportSum"><l>10</l><block s="reportDifference"><block s="reportUnicode"><l></l></block><block s="reportIfElse"><block s="reportLessThan"><l></l><l>a</l></block><block s="reportUnicode"><l>A</l></block><block s="reportUnicode"><l>a</l></block></block></block></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="value"/><l><option>letter</option></l></block></block></block><block s="doIf"><block s="reportEquals"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="doSetVar"><l>value</l><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l></l></list></block></autolambda><list></list></block><block var="value"/></block></block></block></script></block><block s="doIf"><block s="reportIsA"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportOr"><block s="reportLessThan"><l></l><l>0</l></block><block s="reportGreaterThan"><l></l><l>15</l></block></block></autolambda><list></list></block><block var="value"/></block><l><option>number</option></l></block><script><custom-block s="error %txt"><l>Badly formed hex color.</l></custom-block></script></block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>6</l></block><script><custom-block s="error %txt"><l>More than six hex digits.</l></custom-block></script></block><block s="doRepeat"><block s="reportDifference"><l>6</l><block s="reportListLength"><block var="value"/></block></block><script><block s="doSetVar"><l>value</l><block s="reportCONS"><l>0</l><block var="value"/></block></block></script></block><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>1</l><block var="value"/></block></block><block s="reportListItem"><l>2</l><block var="value"/></block></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>3</l><block var="value"/></block></block><block s="reportListItem"><l>4</l><block var="value"/></block></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>5</l><block var="value"/></block></block><block s="reportListItem"><l>6</l><block var="value"/></block></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>X11/W3C name</l><comment w="90" collapsed="true">X11/W3C name</comment></block><script><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>✐ X11</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ X11</l></list></custom-block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="✐ X11"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>✐ X11</l><block s="reportNewList"><list><block s="reportNewList"><list><l>255</l><l>250</l><l>250</l><l>snow</l></list></block><block s="reportNewList"><list><l>248</l><l>248</l><l>255</l><l>ghostwhite</l></list></block><block s="reportNewList"><list><l>245</l><l>245</l><l>245</l><l>whitesmoke</l></list></block><block s="reportNewList"><list><l>220</l><l>220</l><l>220</l><l>gainsboro</l></list></block><block s="reportNewList"><list><l>255</l><l>250</l><l>240</l><l>floralwhite</l></list></block><block s="reportNewList"><list><l>253</l><l>245</l><l>230</l><l>oldlace</l></list></block><block s="reportNewList"><list><l>250</l><l>240</l><l>230</l><l>linen</l></list></block><block s="reportNewList"><list><l>250</l><l>235</l><l>215</l><l>antiquewhite</l></list></block><block s="reportNewList"><list><l>255</l><l>239</l><l>213</l><l>papayawhip</l></list></block><block s="reportNewList"><list><l>255</l><l>235</l><l>205</l><l>blanchedalmond</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>196</l><l>bisque</l></list></block><block s="reportNewList"><list><l>255</l><l>218</l><l>185</l><l>peachpuff</l></list></block><block s="reportNewList"><list><l>255</l><l>222</l><l>173</l><l>navajowhite</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>181</l><l>moccasin</l></list></block><block s="reportNewList"><list><l>255</l><l>248</l><l>220</l><l>cornsilk</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>240</l><l>ivory</l></list></block><block s="reportNewList"><list><l>255</l><l>250</l><l>205</l><l>lemonchiffon</l></list></block><block s="reportNewList"><list><l>255</l><l>245</l><l>238</l><l>seashell</l></list></block><block s="reportNewList"><list><l>240</l><l>255</l><l>240</l><l>honeydew</l></list></block><block s="reportNewList"><list><l>245</l><l>255</l><l>250</l><l>mintcream</l></list></block><block s="reportNewList"><list><l>240</l><l>255</l><l>255</l><l>azure</l></list></block><block s="reportNewList"><list><l>240</l><l>248</l><l>255</l><l>aliceblue</l></list></block><block s="reportNewList"><list><l>230</l><l>230</l><l>250</l><l>lavender</l></list></block><block s="reportNewList"><list><l>255</l><l>240</l><l>245</l><l>lavenderblush</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>225</l><l>mistyrose</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l><l>white</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l><l>black</l></list></block><block s="reportNewList"><list><l>47</l><l>79</l><l>79</l><l>darkslategray</l></list></block><block s="reportNewList"><list><l>47</l><l>79</l><l>79</l><l>darkslategrey</l></list></block><block s="reportNewList"><list><l>105</l><l>105</l><l>105</l><l>dimgray</l></list></block><block s="reportNewList"><list><l>105</l><l>105</l><l>105</l><l>dimgrey</l></list></block><block s="reportNewList"><list><l>112</l><l>128</l><l>144</l><l>slategray</l></list></block><block s="reportNewList"><list><l>112</l><l>128</l><l>144</l><l>slategrey</l></list></block><block s="reportNewList"><list><l>119</l><l>136</l><l>153</l><l>lightslategray</l></list></block><block s="reportNewList"><list><l>119</l><l>136</l><l>153</l><l>lightslategrey</l></list></block><block s="reportNewList"><list><l>190</l><l>190</l><l>190</l><l>gray(X11)</l></list></block><block s="reportNewList"><list><l>190</l><l>190</l><l>190</l><l>grey(X11)</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l><l>gray(W3C)</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l><l>grey(W3C)</l></list></block><block s="reportNewList"><list><l>211</l><l>211</l><l>211</l><l>lightgrey</l></list></block><block s="reportNewList"><list><l>211</l><l>211</l><l>211</l><l>lightgray</l></list></block><block s="reportNewList"><list><l>25</l><l>25</l><l>112</l><l>midnightblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l><l>navy</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l><l>navyblue</l></list></block><block s="reportNewList"><list><l>100</l><l>149</l><l>237</l><l>cornflowerblue</l></list></block><block s="reportNewList"><list><l>72</l><l>61</l><l>139</l><l>darkslateblue</l></list></block><block s="reportNewList"><list><l>106</l><l>90</l><l>205</l><l>slateblue</l></list></block><block s="reportNewList"><list><l>123</l><l>104</l><l>238</l><l>mediumslateblue</l></list></block><block s="reportNewList"><list><l>132</l><l>112</l><l>255</l><l>lightslateblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>205</l><l>mediumblue</l></list></block><block s="reportNewList"><list><l>65</l><l>105</l><l>225</l><l>royalblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l><l>blue</l></list></block><block s="reportNewList"><list><l>30</l><l>144</l><l>255</l><l>dodgerblue</l></list></block><block s="reportNewList"><list><l>0</l><l>191</l><l>255</l><l>deepskyblue</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>235</l><l>skyblue</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>250</l><l>lightskyblue</l></list></block><block s="reportNewList"><list><l>70</l><l>130</l><l>180</l><l>steelblue</l></list></block><block s="reportNewList"><list><l>176</l><l>196</l><l>222</l><l>lightsteelblue</l></list></block><block s="reportNewList"><list><l>173</l><l>216</l><l>230</l><l>lightblue</l></list></block><block s="reportNewList"><list><l>176</l><l>224</l><l>230</l><l>powderblue</l></list></block><block s="reportNewList"><list><l>175</l><l>238</l><l>238</l><l>paleturquoise</l></list></block><block s="reportNewList"><list><l>0</l><l>206</l><l>209</l><l>darkturquoise</l></list></block><block s="reportNewList"><list><l>72</l><l>209</l><l>204</l><l>mediumturquoise</l></list></block><block s="reportNewList"><list><l>64</l><l>224</l><l>208</l><l>turquoise</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l><l>cyan</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l><l>aqua</l></list></block><block s="reportNewList"><list><l>224</l><l>255</l><l>255</l><l>lightcyan</l></list></block><block s="reportNewList"><list><l>95</l><l>158</l><l>160</l><l>cadetblue</l></list></block><block s="reportNewList"><list><l>102</l><l>205</l><l>170</l><l>mediumaquamarine</l></list></block><block s="reportNewList"><list><l>127</l><l>255</l><l>212</l><l>aquamarine</l></list></block><block s="reportNewList"><list><l>0</l><l>100</l><l>0</l><l>darkgreen</l></list></block><block s="reportNewList"><list><l>85</l><l>107</l><l>47</l><l>darkolivegreen</l></list></block><block s="reportNewList"><list><l>143</l><l>188</l><l>143</l><l>darkseagreen</l></list></block><block s="reportNewList"><list><l>46</l><l>139</l><l>87</l><l>seagreen</l></list></block><block s="reportNewList"><list><l>60</l><l>179</l><l>113</l><l>mediumseagreen</l></list></block><block s="reportNewList"><list><l>32</l><l>178</l><l>170</l><l>lightseagreen</l></list></block><block s="reportNewList"><list><l>152</l><l>251</l><l>152</l><l>palegreen</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>127</l><l>springgreen</l></list></block><block s="reportNewList"><list><l>124</l><l>252</l><l>0</l><l>lawngreen</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l><l>green(X11)</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>0</l><l>green(W3C)</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l><l>lime</l></list></block><block s="reportNewList"><list><l>127</l><l>255</l><l>0</l><l>chartreuse</l></list></block><block s="reportNewList"><list><l>0</l><l>250</l><l>154</l><l>mediumspringgreen</l></list></block><block s="reportNewList"><list><l>173</l><l>255</l><l>47</l><l>greenyellow</l></list></block><block s="reportNewList"><list><l>50</l><l>205</l><l>50</l><l>limegreen</l></list></block><block s="reportNewList"><list><l>154</l><l>205</l><l>50</l><l>yellowgreen</l></list></block><block s="reportNewList"><list><l>34</l><l>139</l><l>34</l><l>forestgreen</l></list></block><block s="reportNewList"><list><l>107</l><l>142</l><l>35</l><l>olivedrab</l></list></block><block s="reportNewList"><list><l>189</l><l>183</l><l>107</l><l>darkkhaki</l></list></block><block s="reportNewList"><list><l>240</l><l>230</l><l>140</l><l>khaki</l></list></block><block s="reportNewList"><list><l>238</l><l>232</l><l>170</l><l>palegoldenrod</l></list></block><block s="reportNewList"><list><l>250</l><l>250</l><l>210</l><l>lightgoldenrodyellow</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>224</l><l>lightyellow</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l><l>yellow</l></list></block><block s="reportNewList"><list><l>255</l><l>215</l><l>0</l><l>gold</l></list></block><block s="reportNewList"><list><l>238</l><l>221</l><l>130</l><l>lightgoldenrod</l></list></block><block s="reportNewList"><list><l>218</l><l>165</l><l>32</l><l>goldenrod</l></list></block><block s="reportNewList"><list><l>184</l><l>134</l><l>11</l><l>darkgoldenrod</l></list></block><block s="reportNewList"><list><l>188</l><l>143</l><l>143</l><l>rosybrown</l></list></block></list></block></block></script></block><block s="doSetVar"><l>value</l><custom-block s="✐ no spaces %s"><block var="value"/></custom-block></block><custom-block s="use case-independent comparisons %b"><l><bool>true</bool></l></custom-block><custom-block s="catch %upvar %cs"><l>x11w3c</l><script><block s="doIf"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block var="value"/><block s="reportListItem"><l>4</l><l/></block></block></autolambda><list></list></block><block var="✐ X11"/><block var="x11w3c"/><l>exact matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>?? multiple exact matches for </l><block var="value"/></list></block></custom-block></script></block><block s="doIf"><block s="reportNot"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><block s="reportListItem"><l>4</l><l/></block><custom-block s="substring of %txt before %txt"><block s="reportListItem"><l>4</l><l/></block><block var="value"/></custom-block></block></block></autolambda><list></list></block><block var="✐ X11"/><block var="x11w3c"/><l>partial matches</l></custom-block></block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Color name </l><block var="value"/><l> not found.</l></list></block></custom-block></script></block><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportEquals"><custom-block s="substring of %txt before %txt"><block s="reportListItem"><l>4</l><block var="match"/></block><block var="value"/></custom-block><l></l></block></autolambda><list><l>match</l></list></block><block var="partial matches"/><block var="x11w3c"/><l>head matches</l></custom-block><script><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportIsA"><block s="reportLetter"><l><option>last</option></l><block s="reportListItem"><l>4</l><l/></block></block><l><option>number</option></l></block></block></autolambda><list></list></block><block var="head matches"/><block var="x11w3c"/><l>non-numbered matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="non-numbered matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="head matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script></block></script><script><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportIsA"><block s="reportLetter"><l><option>last</option></l><block s="reportListItem"><l>4</l><l/></block></block><l><option>number</option></l></block></block></autolambda><list></list></block><block var="partial matches"/><block var="x11w3c"/><l>non-numbered matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="non-numbered matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="partial matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script></block></script></block></script><comment w="294.6666666666667" collapsed="true">SUBSET throws here if it handles a unique match</comment></custom-block></script></block><custom-block s="✐ initialize variables"></custom-block></script></block-definition><block-definition s="mmap %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="lists"/></block></block><custom-block s="mmap %repRing over %mult%l"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><block var="lists"/></block></custom-block></block></block></script></block-definition><block-definition s="✐ update HSL" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>L</l></list></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doSetVar"><l>✐ HSL</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="evaluate"><block s="reifyReporter"><script><block s="doSetVar"><l>L</l><block s="reportDifference"><block var="V"/><block s="reportQuotient"><block s="reportProduct"><block var="V"/><block var="S"/></block><l>2</l></block></block></block><block s="doReport"><block s="reportNewList"><list><block var="H"/><block s="reportIfElse"><block s="reportOr"><block s="reportEquals"><block var="L"/><l>0</l></block><block s="reportEquals"><block var="L"/><l>1</l></block></block><l>0</l><block s="reportQuotient"><block s="reportDifference"><block var="V"/><block var="L"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block><block var="L"/></list></block></block></script><list><l>H</l><l>S</l><l>V</l></list></block><custom-block s="HSV color"></custom-block></block></block></block><block s="doIf"><block var="✐ fair?"/><script><block s="doSetVar"><l>✐ raw HSL</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="evaluate"><block s="reifyReporter"><script><block s="doSetVar"><l>L</l><block s="reportDifference"><block var="V"/><block s="reportQuotient"><block s="reportProduct"><block var="V"/><block var="S"/></block><l>2</l></block></block></block><block s="doReport"><block s="reportNewList"><list><block var="H"/><block s="reportIfElse"><block s="reportOr"><block s="reportEquals"><block var="L"/><l>0</l></block><block s="reportEquals"><block var="L"/><l>1</l></block></block><l>0</l><block s="reportQuotient"><block s="reportDifference"><block var="V"/><block var="L"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block><block var="L"/></list></block></block></script><list><l>H</l><l>S</l><l>V</l></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ raw HSV"/></block></block></block></block></script></block></script></block></script></block-definition><block-definition s="min %&apos;a&apos; %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportLessThan"><block var="a"/><block var="b"/></block><block var="a"/><block var="b"/></block></block></script></block-definition><block-definition s="✐ update HSV" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>V</l><l>L</l><l>HSL 0-1</l><l>raw HSL 0-1</l></list></block><block s="doSetVar"><l>HSL 0-1</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ HSL"/></block></block><block s="doSetVar"><l>L</l><block s="reportListItem"><l>3</l><block var="HSL 0-1"/></block></block><block s="doSetVar"><l>V</l><block s="reportSum"><block var="L"/><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="HSL 0-1"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block></block><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="HSL 0-1"/></block><block s="reportIfElse"><block s="reportEquals"><block var="V"/><l>0</l></block><l>0</l><block s="reportDifference"><l>2</l><block s="reportProduct"><l>2</l><block s="reportQuotient"><block var="L"/><block var="V"/></block></block></block></block><block var="V"/></custom-block><block s="doIf"><block var="✐ fair?"/><script><block s="doSetVar"><l>raw HSL 0-1</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ raw HSL"/></block></block><block s="doSetVar"><l>L</l><block s="reportListItem"><l>3</l><block var="raw HSL 0-1"/></block></block><block s="doSetVar"><l>V</l><block s="reportSum"><block var="L"/><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="raw HSL 0-1"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block></block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="raw HSL 0-1"/></block><block s="reportIfElse"><block s="reportEquals"><block var="V"/><l>0</l></block><l>0</l><block s="reportDifference"><l>2</l><block s="reportProduct"><l>2</l><block s="reportQuotient"><block var="L"/><block var="V"/></block></block></block></block><block var="V"/></list></block></block></block></script></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="pen"><comment x="0" y="0" w="226" collapsed="false">The identity function reports its input.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="$brush pen %&apos;dimension&apos;" type="reporter" category="pen"><comment x="0" y="0" w="380.6666666666667" collapsed="false">This block reports the pen size, color, or transparency, in all the same ways that the SET PEN block allows you to set those pen properties. (It will also report the current crayon number, if the pen color was most recently set with SET PEN TO CRAYON.)&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details. </comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;crayon&#xD;color&#xD;fair hue&#xD;transparency&#xD;X11/W3C name&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>size</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>size</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>hue</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>hue</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSV)</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>saturation</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>value (brightness)</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>brightness</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>transparency</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>transparency</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB vector</l></block><script><block s="doReport"><custom-block s="RGB color"></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>red</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>green</l></block><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>blue</l></block><script><block s="doReport"><block s="reportListItem"><l>3</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><block s="doReport"><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><custom-block s="✐ hexchar %s"><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><l></l><l>16</l></block></block></custom-block><custom-block s="✐ hexchar %s"><block s="reportModulus"><l></l><l>16</l></block></custom-block></list></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportRound"><l></l></block></autolambda><list></list></block><custom-block s="RGB color"></custom-block></block></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSV vector</l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l>100</l><l></l></block></autolambda><list></list></block><custom-block s="HSV color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSL vector</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block var="✐ HSL"/></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSL)</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ HSL"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>lightness</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ HSL"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>color</l></block><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>color</l></block><block var="✐ color scale"/><l>not set</l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair hue</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="✐ raw HSL"/></block></block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="✐ raw HSV"/></block></block></script></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSL)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ raw HSL"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair lightness</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ raw HSL"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSL vector</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block var="✐ raw HSL"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSV)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair value (brightness)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSV vector</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block var="✐ raw HSV"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>crayon</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>crayon</l></block><script><block s="doReport"><block var="✐ last crayon"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>X11/W3C name</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>X11</l></block><script><block s="doReport"><block var="✐ last x11"/></block></script></block><block s="doReport"><l>not set</l></block></script></block></script></block-definition><block-definition s="✐ hexchar %&apos;nybble&apos;" type="reporter" category="pen"><comment x="0" y="0" w="245.33333333333334" collapsed="false">Takes a value from 0 to 15 and reports&#xD;the corresponding hexadecimal digit.&#xD;&#xD;For internal use of the color library.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportLessThan"><block var="nybble"/><l>10</l></block><block var="nybble"/><block s="reportUnicodeAsLetter"><block s="reportSum"><block s="reportUnicode"><l>a</l></block><block s="reportDifference"><block var="nybble"/><l>10</l></block></block></block></block></block></script></block-definition><block-definition s="$brush change pen %&apos;dimension&apos; by %&apos;amount&apos;" type="command" category="pen"><comment x="0" y="0" w="334" collapsed="false">Changes any pen property by the specified amount.  Some color scales can&apos;t be adjusted this way unless the color was first SET using that scale.&#xD;Vectors (e.g., RGB color as a list of three numbers) can be incremented&#xD;by a vector as the amount. X11/W3C names can&apos;t be incremented.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;crayon&#xD;color&#xD;fair hue&#xD;transparency&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input><input type="%s"></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doDeclareVariables"><list><l>old</l></list></block><block s="doSetVar"><l>old</l><custom-block s="$brush pen %s"><block var="dimension"/></custom-block></block><block s="doIf"><block s="reportEquals"><block var="old"/><l>not set</l></block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Dimension </l><block var="dimension"/><l> not set.</l></list></block></custom-block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>crayon</l></block><script><custom-block s="$brush set pen to crayon %n"><block s="reportSum"><block var="old"/><block var="amount"/></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><custom-block s="error %txt"><l>Sorry, I don&apos;t know how to add in hexadecimal.</l></custom-block></script></block><block s="doIf"><block s="reportIsA"><block var="amount"/><l><option>number</option></l></block><script><custom-block s="$brush set pen %s to %s"><block var="dimension"/><block s="reportSum"><block var="old"/><block var="amount"/></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportIsA"><block var="amount"/><l><option>list</option></l></block><script><custom-block s="$brush set pen %s to %s"><block var="dimension"/><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block><list><block var="old"/><block var="amount"/></list></custom-block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><custom-block s="error %txt"><block s="reportJoinWords"><list><l>I don&apos;t know how to handle </l><block var="amount"/></list></block></custom-block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations>pt:lança o erro _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg);</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="✐ make integer RGB" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportRound"><l></l></block></autolambda><list></list></block><custom-block s="RGB color"></custom-block></block></block></script></block-definition><block-definition s="substring of %&apos;string&apos; before %&apos;marker&apos;" type="reporter" category="operators"><comment x="0" y="0" w="175.33333333333334" collapsed="false">Reports the part of the first string up to the first instance of the second string inside it.  If the second string isn&apos;t found, reports the entire first string.</comment><header></header><code></code><translations>pt:o texto de _ antes de _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>string</l><l>marker</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;if (!("stringLibCaseIndependentComparison" in world)) {&#xD;    world["stringLibCaseIndependentComparison"] = true;&#xD;};&#xD;if (world["stringLibCaseIndependentComparison"]) {&#xD;    var index=string.toLocaleLowerCase().indexOf(marker.toLocaleLowerCase());&#xD;    if (index&lt;0) {return string};&#xD;    return string.slice(0,index);&#xD;} else {&#xD;    var index=string.indexOf(marker);&#xD;    if (index&lt;0) {return string};&#xD;    return string.slice(0,index);&#xD;}</l></block><list><block var="string"/><block var="marker"/></list></block></block></script></block-definition><block-definition s="use case-independent comparisons %&apos;tf&apos;" type="command" category="operators"><comment x="0" y="0" w="225.33333333333334" collapsed="false">If input is TRUE, comparisons made by functions in the string library will be case-independent (so &quot;FOO&quot; = &quot;foo&quot;).  This is the default.&#xD;If input is FALSE, comparisons will be exact.</comment><header></header><code></code><translations>pt:altera comparações ignorando distinção minúsculas/maiúsculas para _&#xD;</translations><inputs><input type="%b"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>flag</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;world[&apos;stringLibCaseIndependentComparison&apos;] = flag;</l></block><list><block var="tf"/></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block><custom-block s="ignore %s"><l>3</l></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _&#xD;ca:llança _&#xD;es:lanzar _&#xD;fr:lance _&#xD;pt:lança _&#xD;</translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations>de:ignoriere _&#xD;ca:ignora _&#xD;es:ignorar _&#xD;fr:ignore _&#xD;pt:ignora _&#xD;</translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="✐ subset %&apos;pred&apos; %&apos;data&apos; %&apos;catchtag&apos; %&apos;result&apos;" type="predicate" category="pen"><comment x="0" y="0" w="228" collapsed="false">Don&apos;t ask.&#xD;Only for internal use by the SET PEN block.</comment><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input><input type="%cmdRing"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>best match</l></list></block><block s="doSetVar"><l>result</l><block s="reportKeep"><block var="pred"/><block var="data"/></block></block><block s="doIf"><block s="reportListIsEmpty"><block var="result"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="result"/></block></block><script><block s="doSetVar"><l>best match</l><block s="reportListItem"><l>1</l><block var="result"/></block></block><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportListItem"><l>1</l><block var="best match"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportListItem"><l>2</l><block var="best match"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportListItem"><l>3</l><block var="best match"/></block></custom-block><block s="doSetVar"><l>✐ last X11</l><block s="reportListItem"><l>4</l><block var="best match"/></block></block><block s="doSetVar"><l>✐ last set as</l><l>X11</l></block><custom-block s="throw %s"><block var="catchtag"/></custom-block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="✐ no spaces %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><block s="reportTextSplit"><block var="text"/><l> </l></block></block></block></script></block-definition><block-definition s="create %&apos;scope&apos; var %&apos;names&apos;" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates  new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in &apos;names&apos; list).&#xD;&#xD;If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _&#xD;ca:crea les _ variables _&#xD;es:crear las _ variables _&#xD;de:erstellen _ var _&#xD;</translations><inputs><input type="%s" readonly="true">global<options>global&#xD;sprite&#xD;script</options></input><input type="%mult%txt"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block var="scope"/><l>script</l></block><script><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>varName</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;if (!proc.homeContext.variables.vars[varName]) proc.homeContext.variables.addVar(varName);</l></block><list><block var="each item"/></list></block></script></block></script><script><block s="doDeclareVariables"><list><l>global</l></list></block><block s="doIfElse"><block s="reportEquals"><block var="scope"/><l>sprite</l></block><script><block s="doSetVar"><l>global</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script><block s="doSetVar"><l>global</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>varName</l><l>global</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;if (global &amp;&amp; !proc.homeContext.variables.parentFrame.parentFrame.vars[varName]) this.addVariable(varName, true);&#xD;if (!global &amp;&amp; !proc.homeContext.variables.parentFrame.vars[varName]) this.addVariable(varName, false);</l></block><list><block var="each item"/><block var="global"/></list></block></script></block><block s="doRun"><block s="reportJSFunction"><list></list><l>var ide = this.parentThatIsA(IDE_Morph);&#xD;ide.flushBlocksCache(&apos;variables&apos;); // b/c of inheritance&#xD;ide.refreshPalette();</l></block><list></list></block></script></block></script></block-definition><block-definition s="does var %&apos;name&apos; exist?" type="predicate" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block reports &quot;true&quot; if there is a variable with this given name (input slot) in that context.&#xD;&#xD;It can be a global, sprite or script variable.&#xD;&#xD;Otherwise it reports &quot;false&quot;.</comment><header></header><code></code><translations>pt:a variável _ existe&#xD;ca:existeix la variable _ ?&#xD;es:existe la variable _ ?&#xD;de:existiert var _ ?&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>varName</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;return proc.homeContext.variables.silentFind(varName)? true:false;</l></block><list><block var="name"/></list></block></block></script></block-definition><block-definition s="✐ initialize variables" type="command" category="pen"><comment x="0" y="0" w="180" collapsed="false">Creates a bunch of global variables.&#xD;For internal use by Color library.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><custom-block s="does var %s exist?"><l>✐ last set as</l></custom-block><script><block s="doStopThis"><l><option>this block</option></l></block></script></block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ last set as</l><l>✐ fair?</l><l>✐ color scale</l><l>✐ HSL</l><l>✐ last crayon</l><l>✐ last X11</l><l>✐ raw HSL</l><l>✐ raw HSV</l></list></custom-block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></list></block></block></script></block-definition></blocks>